home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-11-06 | 984 b | 40 lines | [TEXT/ToyS] |
- --Before running this script change the "HD:Desktop Folder:sample text" path to point to some text file on your hard drive
-
- on run
- ConvertFilesWithCyclone()
- end run
-
- on ConvertFilesWithCyclone()
-
- set the one_file to "HD:Desktop Folder:sample text"
- tell application "Finder"
- activate
-
- if (exists file one_file) then
- tell application "Cyclone"
- activate
- try
- convert file one_file from Mac_Roman_Euro_Sign to ISO_Latin_1
- on error
- error "Error occured during conversion."
- end try
- set result_file to result
- quit
- end tell
-
- if (exists result_file) then
- set the result_name to (result_file as string)
- display dialog "Cyclone conversion succeeded!" & return & return & "Output file:" & return & result_name ¬
- buttons {"OK"} default button 1
- else
- error "Error occured during conversion."
- end if
-
- else
- error "File \"sample text\" does not exist on Desktop."
- end if
-
- end tell
- end ConvertFilesWithCyclone
-
-